import yagmail,logging

def log_set():
    logging.basicConfig(filename='log.txt',filemode='w+',level=logging.DEBUG,format='%(asctime)s -> %(levelname)s ->%(message)s')

def send_mail(filepath):
    mail=yagmail.SMTP(user='445708046@qq.com',password='sgxcuxgfxpdubhjd',host='smtp.qq.com')
    mail.send(to='445708046@qq.com',subject='今日测试结果',contents='今日测试内容请查收',attachments= filepath)

